package router

import (
	"net/http"
	"perm-mng-sys/handler"

	"github.com/gin-gonic/gin"
)

func Init() *gin.Engine {
	r := gin.Default()
	r.GET("/", func(c *gin.Context) {
		c.String(http.StatusOK, "hello World!")
	})
	r.POST("/login", handler.Login)
	r.POST("/userRole", handler.UserRole)
	r.POST("/roleNode", handler.RoleNode)
	r.GET("/list", handler.List)
	return r
}
